This invention relates to networks, and more particularly, to a system and method for database synchronization.
In many applications, two or more redundant databases storing the same data are maintained to ensure system fault-tolerance and reliability. In particular, in telecommunication networks, redundant service control point (SCP) databases for storing customer data and telephony service data are maintained. These redundant databases are required to store identical copies of the data and therefore must be synchronized.
Because SCP update data can originate from the service management system (SMS) or other network nodes in the Signalling System No. 7 (SS7) network and propagated to all the SCPs, conflicts may result. For example, an update on a particular data record may originate from the SMS and a second update on the same data record may originate from the SS7 network. Both update requests may arrive at one SCP in one sequential order and at a second SCP in another sequential order. The result may be non-identical data in the two SCPs. In another scenario, the transmission of a data update request of a particular data record to a SCP may be delayed by a temporarily downed link. As a result, a second data update request for the same data record may arrive at the same SCP ahead of the earlier data update request. This may produce a data record at this SCP different from those at other SCPs.
A conventional method of preventing conflicts is to mandate a synchronous update paradigm where new data updates are processed only when a previous data update is processed, propagated to all SCPs, and confirmed. Such synchronous schemes require an exchange of a large number of protocol messages. The transmission and processing of these messages results in network bandwidth utilization inefficiencies and adversely impacts real-time performance. In addition, many conventional conflict resolution methods resolve the conflict problem in case of replacement updates, but not conflicts arising from insertion and deletion update operations originating from multiple sources.
It may be seen from the foregoing that there is a need for a method to process conflicting data update requests without the use of synchronizing messages in a synchronous update paradigm. The solution should be capable of processing data update messages arriving out of order and originating from multiple sources.
In accordance with an embodiment of the present invention, a method of maintaining synchronization among multiple databases is provided. The method includes the steps of receiving a data update request for a data record at a database, and comparing a timestamp of the data record to a timestamp of the data update request. The data in the data record is updated with the data update request if the timestamp of the data update request is substantially greater than the timestamp of the data record. Otherwise, the data in the data record is updated with the data update request if the operational priority of the data update request is higher than the operational priority of the data record. Alternatively, the data in the data record is updated with the data update request if the node priority of the data update request is higher than the node priority of the data record.
In accordance with another embodiment of the present invention, a method of processing data update requests originating from multiple sources at a database is provided. The method includes the steps of receiving a data update request for a data record at the database, and comparing a timestamp of the data record to a timestamp of the data update request. The method then updates the data in the data record with the data update request if the timestamp of the data update request is a predetermined conflict time window later than the timestamp of the data record. The operational priority of the data record is then compared to the operational priority of the data update request if the timestamp of the data update request is substantially identical to the timestamp of the data record, and the data in the data record is updated with the data update request if the operational priority of the data update request is higher than the operational priority of the data record. The method then compares the node priority of the data record to the node priority of the data update request if the timestamp of the data update request is substantially identical to the timestamp of the data record, and the operational priority of the data update request is substantially identical to the operational priority of the data record. The data in the data record is then updated with the data update request if the node priority of the data update request is higher than the node priority of the data record. Otherwise, the data update request is ignored in response to the timestamp of the data update request being substantially identical to the timestamp of the data record, the operational priority of the data update request being substantially identical to the operational priority of the data record, and the node priority of the data update request being substantially identical to the node priority of the data record.
In accordance with yet another embodiment of the present invention, a method of handling data update requests for a database includes the steps of receiving a data update request for a data record in the database, comparing a version number of the data record to a version number of the data update request, and resolving update conflict if the version number of the data update request is less than or equal to that of the data record. The timestamp of the data record is first compared to the timestamp of the data update request. If the timestamp of the data update request is a predetermined conflict time window later than the timestamp of the data record, the data in the data record is updated with the data update request. If the timestamp of the data update request is substantially identical to the timestamp of the data record, the operational priority of the data record is compared with the operational priority of the data update request. The data in the data record is then with the data update request if the operational priority of the data update request is higher than the operational priority of the data record. The method compares the node priority of the data record to the node priority of the data update request if the timestamp of the data update request is substantially identical to the timestamp of the data record and the operational priority of the data update request is substantially identical to the operational priority of the data record. The data in the data record is updated with the data update request if the node priority of the data update request is higher than the node priority of the data record. Otherwise, the data update request is ignored if the timestamp of the data update request is substantially identical to the timestamp of the data record, the operational priority of the data update request is substantially identical to the operational priority of the data record, and the node priority of the data update request is substantially identical to the node priority of the data record.
A technical advantage of the present invention is achieving database synchronicity without the use of synchronizing messages and thus avoiding high traffic on the links between the databases. Furthermore, even if data update requests arrives at the databases out of the correct order or in a different order than at another database, the present invention is operable to process the data update requests and maintain the same data content at the two databases. dr
For a more complete understanding of the present invention, the objects and advantages thereof, reference is now made to the following descriptions taken in connection with the accompanying drawings in which:
FIG. 1 is a simplified block diagram of a network of redundant service control point (SCP) nodes;
FIGS. 2 and 3 are flowcharts of an embodiment of a local update process according to the teachings of the present invention;
FIGS. 4, 5A and 5B are flowcharts of an embodiment of a service management system (SMS) update process according to the teachings of the present invention;
FIG. 6 is a flowchart of an embodiment of a reset conflict info process according to the teachings of the present invention;
FIG. 7 is a flowchart of an embodiment of a UR (updated record) wins conflict process according to the teachings of the present invention;
FIG. 8 is a simplified block diagram showing the numerous data update paths between the SMS and SCPs; and
FIG. 9 is a simplified block diagram showing more details of a SCP according to the teachings of the present invention.